1 00:00:00,520 --> 00:00:01,330 Hey there. 2 00:00:01,330 --> 00:00:05,710 We're going to be wrapping up the first section of our story in this lecture, the last things we need 3 00:00:05,710 --> 00:00:10,360 to do is have our Squidward walk to the basement and open the doors, and then we'll force the players 4 00:00:10,360 --> 00:00:14,560 to wait a little bit, and then afterwards we'll play a sound to make it sound like Squidward is screaming 5 00:00:14,560 --> 00:00:19,270 from the basement, which means the players will then be tasked at locating Squidward and restoring 6 00:00:19,270 --> 00:00:20,350 power in the basement. 7 00:00:20,350 --> 00:00:21,250 So let's get started. 8 00:00:21,250 --> 00:00:28,300 So after all of our tasks are complete and the power is turned off and the entire building turns dark, 9 00:00:28,300 --> 00:00:34,150 what we're going to want to do next is our game comms bindable, and we want to fire and give the action 10 00:00:34,150 --> 00:00:39,760 in our game comms enum for the server, and we want to give the action inside of the normal Squidward 11 00:00:39,760 --> 00:00:41,860 service to move Squidward. 12 00:00:41,860 --> 00:00:47,260 So he's going to be walking, and the positions we need to give to the service is going to be inside 13 00:00:47,260 --> 00:00:53,560 of the workspace dot filtering folder, and there's a folder in there called Pathfinding Parts, and 14 00:00:53,560 --> 00:00:55,990 there's a folder in there containing all the parts that are normal. 15 00:00:55,990 --> 00:00:57,490 Squidward needs to walk to. 16 00:00:57,490 --> 00:01:01,810 So inside of the main story here, as you can see, here's one of the invisible parts he's going to 17 00:01:01,810 --> 00:01:02,560 be unanchored. 18 00:01:02,560 --> 00:01:06,970 He's going to walk first to this point, we're going to open this door, and then he's going to walk 19 00:01:06,970 --> 00:01:08,530 to the second point. 20 00:01:08,530 --> 00:01:14,080 And here after we open this door, and then he's going to walk finally to this last part right here. 21 00:01:14,080 --> 00:01:18,250 So we'll just walk down the stairs and then we're going to remove him from the game because we don't 22 00:01:18,250 --> 00:01:19,150 need him anymore. 23 00:01:19,540 --> 00:01:23,560 So in order to do this, that means we're going to have to script the functionality for moving our Squidward 24 00:01:23,560 --> 00:01:28,660 so we can go inside of server script service and open up our normal Squidward service. 25 00:01:28,660 --> 00:01:32,950 And we already have our function in here to move our Squidward to a particular position. 26 00:01:32,950 --> 00:01:37,510 So that means the first thing in this function that we would have to do is un anchor our Squidward. 27 00:01:37,510 --> 00:01:40,810 So let's go ahead and create a reference to his route part. 28 00:01:40,810 --> 00:01:48,520 So after we get his humanoid, we can also get the route part inside of regular Squidward dot humanoid 29 00:01:48,520 --> 00:01:49,330 route part. 30 00:01:49,330 --> 00:01:52,930 Another important thing that we have to do is on our humanoid. 31 00:01:52,930 --> 00:01:59,110 We want to set a state to be disabled, so we're going to use the enum dot humanoid state type, and 32 00:01:59,110 --> 00:02:01,810 we're going to refer to the falling down state type. 33 00:02:01,810 --> 00:02:05,500 And we want to disable the state type from ever occurring on our Squidward. 34 00:02:05,590 --> 00:02:10,270 And this is because when our Squidward gets un anchored or is humanoid route part gets un anchored, 35 00:02:10,270 --> 00:02:14,530 he's going to be put into the falling down state, and that means he's going to fall over, which doesn't 36 00:02:14,530 --> 00:02:15,490 look very nice. 37 00:02:15,580 --> 00:02:20,680 So we make sure to disable that state on our humanoid so it never occurs in the first place. 38 00:02:21,220 --> 00:02:26,230 We're also going to want to make a reference to the door event to be able to open doors using the door 39 00:02:26,230 --> 00:02:26,590 service. 40 00:02:26,590 --> 00:02:29,680 So that's in service storage dot events dot Bindesboll's dot door. 41 00:02:30,380 --> 00:02:36,800 And then I'm also going to create a constant down here to keep track of the hip height for our humanoid, 42 00:02:36,800 --> 00:02:38,300 just in case it gets reset. 43 00:02:38,300 --> 00:02:41,480 And the hip height for our humanoid is 2.4 studs. 44 00:02:41,870 --> 00:02:46,400 So now inside of our move Squidward to Positions function, the first thing we need to do is get our 45 00:02:46,400 --> 00:02:48,170 root part and anchor it. 46 00:02:48,170 --> 00:02:54,530 So we'll make anchored false, and then we're going to set the root parts network ownership to the server. 47 00:02:54,530 --> 00:02:56,840 Or basically we don't pass anything to this function. 48 00:02:56,840 --> 00:03:02,570 That way the server has control over all the functionality for our Squidward, and an exploiter isn't 49 00:03:02,570 --> 00:03:07,100 able to move around his position if they have network ownership over his root part. 50 00:03:07,100 --> 00:03:12,440 But since we set it to the server, we fix that problem, and then we're going to get all the positions 51 00:03:12,440 --> 00:03:18,260 passed to the args table, which is the key positions, and we get all of those children, which is 52 00:03:18,260 --> 00:03:19,970 every single one of those parts. 53 00:03:20,000 --> 00:03:23,540 Another important thing we got to make sure real quick after we un anchor them, is we want to make 54 00:03:23,540 --> 00:03:29,450 sure that the humanoid hip height is equal to the hip height we defined in that constant. 55 00:03:29,660 --> 00:03:32,420 And then we can loop through every single position part. 56 00:03:32,420 --> 00:03:36,950 So we'll get the index and the position inside of positions. 57 00:03:37,310 --> 00:03:43,130 And what we're going to do is we're going to use the move two function inside of our humanoid. 58 00:03:43,130 --> 00:03:44,390 Now that he's un anchored. 59 00:03:44,390 --> 00:03:49,400 And it's going to force him to walk to a particular position, and the position we want him to walk 60 00:03:49,400 --> 00:03:50,690 to is going to be our position. 61 00:03:50,690 --> 00:03:52,160 Part dot position. 62 00:03:53,270 --> 00:03:57,260 So this is going to sequentially move through each of those three positions. 63 00:03:57,260 --> 00:04:00,080 So we'll wait for our humanoid to get to that position. 64 00:04:00,080 --> 00:04:02,510 So there's an event called Move to Finished. 65 00:04:02,510 --> 00:04:04,160 And we're going to wait for this to fire. 66 00:04:04,160 --> 00:04:07,280 That way it signifies whether or not he has reached this position yet. 67 00:04:07,280 --> 00:04:12,680 And then once that's done, we want to check the current index that we're at in this position table. 68 00:04:12,680 --> 00:04:17,570 If he reaches this first position, we're going to want to open this door as well as this door. 69 00:04:17,570 --> 00:04:22,280 And then when he reaches the second position, we're going to want to close this door. 70 00:04:22,280 --> 00:04:26,870 So what we could do is we could check if I is equal to one. 71 00:04:26,870 --> 00:04:31,850 If it is, then we're going to use our door event and fire to open a door. 72 00:04:31,850 --> 00:04:35,060 And that door is going to be inside of the workspace. 73 00:04:35,060 --> 00:04:42,200 So the door model is equal to workspace dot krusty Krab, dot doors, dot kitchen door, and the proximity 74 00:04:42,200 --> 00:04:45,920 prompt we need to refer to will be the first prompt inside of this door. 75 00:04:45,920 --> 00:04:51,440 So workspace dot krusty krab dot doors dot kitchen door dot prompt part. 76 00:04:51,800 --> 00:04:57,230 We'll get attachment number one and refer to the proximity prompt that is inside of there. 77 00:04:57,230 --> 00:05:02,120 So that means the door when this open is going to swing in this direction. 78 00:05:02,600 --> 00:05:08,690 And then after that, we don't want the players to be able to close this door on our Squidward. 79 00:05:08,870 --> 00:05:13,430 So we're going to go down here and we're going to lock this door as well. 80 00:05:13,430 --> 00:05:17,660 And we don't need to pass the proximity prompt to it because we're just locking the door. 81 00:05:19,040 --> 00:05:23,330 And then we want to make sure to do the same thing for the basement door, but we have to unlock the 82 00:05:23,330 --> 00:05:24,980 basement door before we open it. 83 00:05:24,980 --> 00:05:29,810 So what we're going to do is I'm going to copy this, paste this here. 84 00:05:29,810 --> 00:05:33,410 This one right here can go right here. 85 00:05:33,620 --> 00:05:36,170 We want to unlock a door. 86 00:05:36,170 --> 00:05:39,500 And that door model is going to be the basement door. 87 00:05:39,770 --> 00:05:42,470 And then we want to go ahead and open the basement door. 88 00:05:42,890 --> 00:05:45,860 And we'll refer to the correct proximity prompt. 89 00:05:45,860 --> 00:05:50,060 So inside of the basement door we get the prompt part attachment one and get the proximity prompt in 90 00:05:50,060 --> 00:05:50,510 there. 91 00:05:50,510 --> 00:05:53,450 And after we open it we're going to relock the door. 92 00:05:53,450 --> 00:05:57,440 So again the players are unable to close the door in his face. 93 00:05:57,440 --> 00:06:01,010 So we're going to actually just copy this up here. 94 00:06:01,010 --> 00:06:04,040 And this time we're going to lock the basement door. 95 00:06:04,400 --> 00:06:06,020 And that should be good to go here. 96 00:06:06,020 --> 00:06:12,380 And then the next thing we can check is if the index reaches two, which means he is now inside of this 97 00:06:12,380 --> 00:06:13,010 room right here. 98 00:06:13,010 --> 00:06:17,300 If he's inside of here, that means we're going to have to shut this door. 99 00:06:17,300 --> 00:06:20,450 So that means we're going to have to unlock it again and then relock it. 100 00:06:20,450 --> 00:06:26,720 And if you actually don't want to do that, we could just get rid of this right here or copy it. 101 00:06:26,720 --> 00:06:34,370 And then we can just have it lock it afterwards because we want to open it and then we want to close 102 00:06:34,370 --> 00:06:34,640 it. 103 00:06:34,640 --> 00:06:36,500 So copy this. 104 00:06:36,500 --> 00:06:40,610 We want to get rid of this because we don't care about the proximity prompt. 105 00:06:40,610 --> 00:06:44,060 And we want to go ahead and close the basement door. 106 00:06:44,060 --> 00:06:45,230 So close door. 107 00:06:45,230 --> 00:06:48,470 And then when we close it then we go ahead and lock the door. 108 00:06:49,010 --> 00:06:54,290 And then after this completes, once Squidward is inside of the basement, we can go ahead and unlock 109 00:06:54,290 --> 00:06:57,740 the kitchen door again because it doesn't need to be locked anymore. 110 00:06:57,740 --> 00:07:00,170 So we're just going to copy this here. 111 00:07:00,170 --> 00:07:04,220 So once we're done looping, we're going to go ahead and unlock the door. 112 00:07:04,220 --> 00:07:08,180 And since Squidward is already going to be inside of that room and that door is going to be shut, we're 113 00:07:08,180 --> 00:07:13,760 just going to go ahead and destroy our regular Squidward because we do not need him anymore. 114 00:07:14,330 --> 00:07:19,730 Okay, so now that our Squidward has walked and he's inside of the basement, what we need to do now 115 00:07:19,730 --> 00:07:22,070 is give a new objective to the player. 116 00:07:22,070 --> 00:07:26,240 So Updateui event we're going to fire to all the clients GUI actions enum. 117 00:07:26,240 --> 00:07:28,310 We're going to add an objective. 118 00:07:29,290 --> 00:07:33,400 And that means we're going to have to add a new objective to our objectives table. 119 00:07:33,400 --> 00:07:36,760 So if we go ahead and scroll up we want to add two new objectives. 120 00:07:36,760 --> 00:07:40,870 One of these objectives is to go ahead and wait for Squidward. 121 00:07:41,710 --> 00:07:49,600 And inside of here we can set the text equal to wait for Squidward to restore the power. 122 00:07:49,600 --> 00:07:54,760 And then the other objective we'll need is that once Squidward screams for his life and we don't know 123 00:07:54,760 --> 00:07:59,290 where he's at, we're going to get a new objective of needing to go to the basement, so we'll call 124 00:07:59,290 --> 00:08:01,000 it Go to basement. 125 00:08:01,770 --> 00:08:08,010 And the text for this one's going to be go to the basement and find Squidward. 126 00:08:08,340 --> 00:08:14,970 And since we're basically going to automatically make this objective fail because Squidward isn't going 127 00:08:14,970 --> 00:08:18,720 to restore the power and come back, we don't need to add a fulfilled boolean in here, but we will 128 00:08:18,720 --> 00:08:23,730 keep track of the fulfilled boolean inside of this one, which will be false as default for now, and 129 00:08:23,730 --> 00:08:25,110 then we can go back down. 130 00:08:26,190 --> 00:08:30,780 And the objective name we need to add is going to be wait for Squidward. 131 00:08:32,070 --> 00:08:35,610 And the text is inside of game sections. 132 00:08:35,610 --> 00:08:40,800 Dot objectives dot wait for Squidward and we get the text inside of there. 133 00:08:40,800 --> 00:08:45,690 And after we do that, we're just going to wait for a random amount of time so we can do task dot wait 134 00:08:45,690 --> 00:08:51,840 and use RNG next number, and we'll wait anywhere between 12 and 22 seconds just to build up a little 135 00:08:51,840 --> 00:08:52,980 bit of suspense. 136 00:08:52,980 --> 00:08:57,510 And then after that time is up, we're going to play the scream sound for Squidward. 137 00:08:57,510 --> 00:09:04,440 So using the Game Comms event, we're going to fire to all of the clients using the Game Comms enum 138 00:09:04,440 --> 00:09:11,640 client two client play sound, and the sound we wish to play is inside of the sound service. 139 00:09:11,640 --> 00:09:16,770 Dot SFX and there's a Squidward scream sound inside of there, so I'll show you what it sounds like. 140 00:09:16,770 --> 00:09:19,230 Here we go in SFX Here's Squidward scream. 141 00:09:19,230 --> 00:09:20,310 We're going to play this! 142 00:09:25,640 --> 00:09:27,740 It's 15 seconds long about. 143 00:09:27,740 --> 00:09:31,760 So that means after we play it, we're going to want to wait for 15 seconds just to ensure that the 144 00:09:31,760 --> 00:09:32,990 sound has ended. 145 00:09:33,170 --> 00:09:37,190 But we do want to play this sound at a particular point, which is going to be inside of the basement. 146 00:09:37,190 --> 00:09:40,310 So we're going to set play at point equal to true. 147 00:09:40,310 --> 00:09:44,810 And the position that we want to set it to is inside of server storage. 148 00:09:44,990 --> 00:09:50,180 And inside of the other stuff folder there's a folder called Audio Positions. 149 00:09:50,180 --> 00:09:55,070 And inside of there we have a single part for the Squidward scream. 150 00:09:55,070 --> 00:09:57,470 So this denotes the position inside of our basement. 151 00:09:57,470 --> 00:10:01,190 We want the sound to emanate from, so we give that position to the client. 152 00:10:01,190 --> 00:10:04,730 The client creates the part of the position and plays that sound from that point. 153 00:10:04,880 --> 00:10:11,270 And then we can wait for 15 seconds, and after we wait for 15 seconds, we're going to use the Updateui 154 00:10:11,270 --> 00:10:14,150 event and fire to all of the clients that they have failed. 155 00:10:14,150 --> 00:10:16,160 The objective, which was to wait for Squidward. 156 00:10:16,160 --> 00:10:20,120 So G actions enum dot objective failed. 157 00:10:21,240 --> 00:10:27,030 And our failed objective is going to be equal to the wait for Squidward. 158 00:10:28,490 --> 00:10:32,480 And then after that, we're going to use the update UI event again, and we're going to fire to all 159 00:10:32,480 --> 00:10:36,380 the clients to add the new objective, which is to go to the basement. 160 00:10:36,380 --> 00:10:46,040 So GUI actions enum dot add objective and that objective name is go to basement and the text is going 161 00:10:46,040 --> 00:10:48,530 to be equal to game sections. 162 00:10:48,530 --> 00:10:52,310 Dot objectives dot go to basement dot text. 163 00:10:52,310 --> 00:10:55,370 And then once we do that we're going to use our door event. 164 00:10:55,370 --> 00:11:00,440 And we need to go ahead and unlock the basement door again so the players can actually open it and go 165 00:11:00,440 --> 00:11:01,310 into the basement. 166 00:11:01,310 --> 00:11:07,010 And we're also going to need to make the can collide on this invisible part in front of our door. 167 00:11:07,010 --> 00:11:13,670 We need to disable it because this part stops any players from trying to go into the basement when this 168 00:11:13,670 --> 00:11:16,070 door is open and Squidward is walking through it. 169 00:11:16,070 --> 00:11:21,140 Once we need to go look for Squidward, we're going to have to set the Can Collide property to false. 170 00:11:21,380 --> 00:11:22,280 So door event. 171 00:11:22,280 --> 00:11:29,090 We're going to fire to unlock a door, and the door we need to lock, so we'll reference the door model 172 00:11:29,090 --> 00:11:30,020 is in the workspace. 173 00:11:30,020 --> 00:11:35,840 Dot Krusty Krab doors dot basement door, and then we're going to refer to the workspace inside of the 174 00:11:35,840 --> 00:11:36,800 filtering folder. 175 00:11:36,800 --> 00:11:41,840 We're going to get the basement blocking wall and we're going to set can collide equal to false. 176 00:11:41,840 --> 00:11:43,940 And that allows our players to go into the basement. 177 00:11:43,940 --> 00:11:44,960 And guess what. 178 00:11:44,960 --> 00:11:48,080 Our start section one function is complete. 179 00:11:48,080 --> 00:11:52,010 That means in the next section we'll have another function. 180 00:11:52,010 --> 00:11:57,620 We could call it start section two that will get executed for all of the basement functionality. 181 00:11:57,620 --> 00:12:02,870 But for right now, let's go ahead and test what we've got completed inside of Start section one. 182 00:12:03,500 --> 00:12:09,320 So we are writing to the restaurant, and then we're going to get dropped off and we'll head inside. 183 00:12:09,470 --> 00:12:14,390 And once we go inside, we're going to have to listen to Squidward talk for a little bit, and then 184 00:12:14,390 --> 00:12:17,180 we should get our task set up after he's done speaking. 185 00:12:17,660 --> 00:12:20,690 So now we can go ahead and start working on all of our tasks. 186 00:12:20,690 --> 00:12:22,280 We'll go ahead and clean the floor. 187 00:12:22,280 --> 00:12:25,940 And of course, you can change the number of tasks inside of the script. 188 00:12:25,940 --> 00:12:30,740 Or you can even script a system where, depending on the number of players that are going to be inside 189 00:12:30,740 --> 00:12:35,450 of the game, you could change the tasks to match the amount of players that you have. 190 00:12:35,450 --> 00:12:39,260 So if there's only one player, you don't want to overwhelm them with too many tasks. 191 00:12:39,260 --> 00:12:42,920 But if there's a lot of players, then you might want to give them a lot of tasks. 192 00:12:44,510 --> 00:12:49,700 And the last thing we need to do is grab our food here, grab our food, and then we can go ahead and 193 00:12:49,700 --> 00:12:53,180 head into the kitchen, and we'll go ahead and refill the fridge. 194 00:12:53,180 --> 00:12:58,280 And just to test that, this door will open, I'm actually going to shut it on Squidward and let's see 195 00:12:58,280 --> 00:13:00,890 if he can go ahead and walk inside of there. 196 00:13:01,670 --> 00:13:04,700 So he's going to go check the breaker in the basement. 197 00:13:04,700 --> 00:13:09,680 We've got our glow stick, and let's go ahead and see how he walks to these different points. 198 00:13:09,680 --> 00:13:11,930 We haven't added a walking animation to him. 199 00:13:11,930 --> 00:13:15,350 I don't think it's very necessary, but you can go ahead and add one if you'd like. 200 00:13:15,350 --> 00:13:17,630 And it looks like we did get an error in the console. 201 00:13:17,630 --> 00:13:19,610 So let's go ahead and check out what that is real quick. 202 00:13:19,610 --> 00:13:25,550 So inside of line 61, in our normal Squidward service, we're attempting to index nil with Get Children. 203 00:13:25,910 --> 00:13:29,810 So that is our positions that we get passed from. 204 00:13:29,810 --> 00:13:31,610 Move Squidward to positions. 205 00:13:31,610 --> 00:13:37,640 So that means let's go ahead and take a look inside of the game sections when we go and fire our games 206 00:13:37,640 --> 00:13:38,180 combined. 207 00:13:38,180 --> 00:13:39,680 Able to move Squidward. 208 00:13:39,830 --> 00:13:40,130 Ah! 209 00:13:40,130 --> 00:13:46,160 And the reason being is because we set this to be position and not positions. 210 00:13:46,160 --> 00:13:51,710 So it's very important that you have the strings matching inside of your scripts, so make sure that's 211 00:13:51,710 --> 00:13:53,900 positions and not position. 212 00:13:53,900 --> 00:13:54,500 Okay. 213 00:13:54,500 --> 00:13:56,960 We can go ahead and try this out again okay. 214 00:13:56,960 --> 00:13:58,160 Now we have our glow stick. 215 00:13:58,160 --> 00:14:02,720 And let's go ahead and see if Squidward actually walks to the points this time. 216 00:14:02,870 --> 00:14:06,650 So after he's done talking here, let's see if he opens this door. 217 00:14:06,650 --> 00:14:09,440 And we'll also check to see if he actually opens the basement door. 218 00:14:09,440 --> 00:14:12,080 So I'll stand right in here to go see if he moves. 219 00:14:15,100 --> 00:14:16,150 Okay, there we go. 220 00:14:16,150 --> 00:14:21,670 He opens that both doors open and as you can see, we were unable to enter into the basement because 221 00:14:21,670 --> 00:14:24,190 that invisible wall walked us from entering. 222 00:14:24,190 --> 00:14:25,660 And as you can see, the doors locked. 223 00:14:25,660 --> 00:14:28,390 We were not able to go in, but this door did get unlocked. 224 00:14:28,390 --> 00:14:30,490 So we're able to open and close it again. 225 00:14:35,150 --> 00:14:37,730 Now it does look like we did get another error. 226 00:14:37,730 --> 00:14:42,080 Unable to assign property position vector three expected, but we got nil. 227 00:14:42,080 --> 00:14:46,850 So it looks like we probably had another typo inside of our function that we're going to go ahead and 228 00:14:46,850 --> 00:14:48,050 have to fix. 229 00:14:48,990 --> 00:14:51,210 So looks like we actually got a total of two errors. 230 00:14:51,210 --> 00:14:56,160 One is we were unable to assign property position vector, three expect to got nil and an argument one 231 00:14:56,160 --> 00:14:56,850 missing or nil. 232 00:14:56,850 --> 00:14:58,620 So let's go ahead and tackle this one first. 233 00:14:58,620 --> 00:15:02,370 Whatever we pass from the server we pass them nil for some reason. 234 00:15:02,370 --> 00:15:09,180 So if we go ahead and go back to the game sections and we look at where we want them to play a sound. 235 00:15:11,370 --> 00:15:17,310 Ah, the reason is because we're actually passing the part instance itself instead of the actual vector 236 00:15:17,310 --> 00:15:17,790 three. 237 00:15:17,790 --> 00:15:21,960 So we need to get the position of this part and pass that instead. 238 00:15:22,080 --> 00:15:27,810 And then for this other function we're getting an error of argument one missing or nil to the fail objective 239 00:15:27,810 --> 00:15:28,530 function. 240 00:15:28,530 --> 00:15:36,150 So if we go into starter player starter player scripts and we go and open up our main GUI handler and 241 00:15:36,150 --> 00:15:41,610 go down to line 66, we can see what exactly is nil in this case failed objective. 242 00:15:41,610 --> 00:15:48,630 When we go to our objective frame and get into our objective list and find which objective was passed 243 00:15:48,630 --> 00:15:49,530 to this function. 244 00:15:49,530 --> 00:15:53,790 Apparently, possibly this string right here could be nil. 245 00:15:54,120 --> 00:15:59,520 So what we're going to do is we're going to double check real quick when we tell them to fail an objective. 246 00:15:59,520 --> 00:16:00,000 There we go. 247 00:16:00,000 --> 00:16:01,020 There's our problem. 248 00:16:01,020 --> 00:16:05,880 We put failed objective, but we forgot to include the extra string of name. 249 00:16:05,880 --> 00:16:09,750 So the total string is failed objective name and not failed objective. 250 00:16:09,750 --> 00:16:12,510 Again, very important to match your strings. 251 00:16:12,510 --> 00:16:16,260 So we fix that problem and we should have fixed our audio problem. 252 00:16:16,260 --> 00:16:18,780 So let's go ahead and test it out one last time. 253 00:16:20,280 --> 00:16:21,120 Okay. 254 00:16:21,120 --> 00:16:24,660 Squidward goes into the basement and he's gone. 255 00:16:24,990 --> 00:16:28,680 And now we're going to wait and see if any errors pop up again. 256 00:16:28,680 --> 00:16:31,200 But hopefully we shouldn't get any errors this time. 257 00:16:34,350 --> 00:16:35,280 Okay, there we go. 258 00:16:35,280 --> 00:16:37,770 We can hear Squidward screaming in the distance. 259 00:16:42,630 --> 00:16:46,380 Sounds like it's coming from under the ground in the basement. 260 00:16:47,430 --> 00:16:48,900 So there we go. 261 00:16:48,900 --> 00:16:52,980 We get a new objective, go to the basement and find Squidward. 262 00:16:52,980 --> 00:16:54,930 So that means we should be able to open this door. 263 00:16:54,930 --> 00:16:55,650 Perfect. 264 00:16:55,650 --> 00:16:57,240 And we should be able to walk through. 265 00:16:57,270 --> 00:16:58,200 Perfect. 266 00:16:58,650 --> 00:17:04,290 Now, this is the time where we would walk down into the stairs and we would touch this basement part, 267 00:17:04,290 --> 00:17:07,080 which would start the next section of our game. 268 00:17:07,080 --> 00:17:11,610 So when a player touches this invisible part that's right here, we're going to teleport all the players 269 00:17:11,610 --> 00:17:12,150 here. 270 00:17:12,150 --> 00:17:13,830 This flashlight is going to be on the floor. 271 00:17:13,830 --> 00:17:16,710 And we're going to tell the players to collect this flashlight. 272 00:17:16,920 --> 00:17:19,440 And then this is when the horror game starts. 273 00:17:19,440 --> 00:17:23,040 They're going to be tasked with figuring out how to restore the power. 274 00:17:23,040 --> 00:17:28,110 And then they're going to have to try and escape the basement while they're being hunted down. 275 00:17:28,230 --> 00:17:30,000 Now to get them trapped in the basement. 276 00:17:30,000 --> 00:17:34,200 What we're going to do is when that part gets touched, we're going to move all the players down there. 277 00:17:34,320 --> 00:17:38,820 We're going to have their camera move to that part that's inside of here, looking down at the stairs, 278 00:17:38,820 --> 00:17:43,230 and we're going to put our bad Squidward guy right here, and he's going to push this crate down on 279 00:17:43,230 --> 00:17:43,680 the stairs. 280 00:17:43,680 --> 00:17:45,270 It's going to break the stairs. 281 00:17:45,270 --> 00:17:49,260 And then we're just going to block them from being able to exit the basement. 282 00:17:49,260 --> 00:17:55,440 And then from this point, it's up to them to explore the basement and try to find the key that will 283 00:17:55,440 --> 00:17:59,010 go ahead and unlock our breaker room, which is over here. 284 00:17:59,010 --> 00:18:03,960 So when they try to interact with this, it tells them the door requires the key breaker room key. 285 00:18:03,960 --> 00:18:07,500 So they're going to be like, huh, we have to find a key in this place. 286 00:18:07,500 --> 00:18:12,360 Otherwise, congratulations, we have wrapped up our first section of the story and the next section 287 00:18:12,360 --> 00:18:12,750 of the course. 288 00:18:12,750 --> 00:18:17,010 We're going to be working on the second part of our story, which includes creating the AI Squidward 289 00:18:17,010 --> 00:18:19,830 monster that's going to be hunting down our players. 290 00:18:19,980 --> 00:18:21,210 See you there.